<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title"  data-rule="required" class="form-control" name="row[title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subtitle')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-subtitle" data-rule="required" class="form-control" name="row[subtitle]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cover_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-cover_image" data-rule="required" class="form-control" size="50" name="row[cover_image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-cover_image" class="btn btn-danger plupload" data-input-id="c-cover_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-cover_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-cover_image" class="btn btn-primary fachoose" data-input-id="c-cover_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-cover_image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-cover_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tache')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tache" data-rule="required" class="form-control" name="row[tache]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Duration')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-duration" data-rule="required" class="form-control" name="row[duration]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Teacher_manifesto')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-teacher_manifesto" data-rule="required" class="form-control" name="row[teacher_manifesto]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Difficulty')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="first form-control" id="c-difficulty" data-rule="required"name="row[difficulty]" >
                <option value="1">★</option>
                <option value="2">★★</option>
                <option value="3">★★★</option>
                <option value="4">★★★★</option>
                <option value="5">★★★★★</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
            {foreach name="typeStatusList" item="vo"}
            <label for="row[type_status]-{$key}"><input id="row[type_status]-{$key}" class="type_status" name="row[type_status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group help_id">
        <label class="control-label col-xs-12 col-sm-2">{:__('Help_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-help_id" data-source="helper/selectpage" data-params='{"custom[teacher_id]":"{$teacher_id}"}' class="form-control selectpage" data-field="nick_name" name="row[help_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group course_num" >
        <label class="control-label col-xs-12 col-sm-2">{:__('Course_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-course_num" class="form-control" name="row[course_num]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tag_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tag_ids" data-rule="required" data-source="tag/selectpage"  data-multiple="true" data-field="tag_name" class="form-control selectpage" name="row[tag_ids]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subject_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-subject_id"  data-rule="required" data-source="subject/selectpage"  data-field="subject_name" class="form-control selectpage" name="row[subject_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Grade_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-grade_ids" data-rule="required" data-source="grade/selectpage"  data-multiple="true" data-field="grade_name" class="form-control selectpage" name="row[grade_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Classify_type')}:</label>
        <div class="col-xs-12 col-sm-8">
<!--            <input id="c-classify_type" class="form-control" name="row[classify_type]" type="number">-->
            <input id="c-classify_type" data-rule="required" data-source="classify/selectpage" class="form-control selectpage"  name="row[classify_type]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_free')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-is_free" class="form-control selectpicker" name="row[is_free]" >
                {foreach name="isFreeList" item="vo"}
                    <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group price">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control" step="0.01" name="row[price]" type="number">
        </div>
    </div>
    <div class="form-group promotion">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_promotion')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-is_promotion" class="form-control selectpicker" name="row[is_promotion]">
                {foreach name="isPromotionList" item="vo"}
                    <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group promotion_price" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Promotion_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-promotion_price" class="form-control" step="0.01" name="row[promotion_price]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_discount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-is_discount" class="form-control selectpicker" name="row[is_discount]">
                {foreach name="isDiscountList" item="vo"}
                <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group discount" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('discount_indate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discount_indate" class="form-control" step="0.1" name="row[discount_indate]" type="number">
        </div>
    </div>
    <div class="form-group discount" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Discount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discount" class="form-control" step="0.01" name="row[discount]" type="number">
        </div>
    </div>
    <div class="form-group ">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_trail')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="is_trail-1">
                    <input id="is_trail-1" class="is_trail" name="row[is_trail]" type="radio" value="1" checked/> 有</label>
                <label for="is_trail-0">
                    <input id="is_trail-0" class="is_trail" name="row[is_trail]" type="radio" value="0"/> 无</label>
            </div>
        </div>
    </div>
    <div class="form-group mediauri" >
        <label class="control-label col-xs-12 col-sm-2">{:__('Trial_video')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-trial_video" class="form-control" size="50" name="row[trial_video]" type="text" >
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-media_uri" class="btn btn-danger plupload" data-input-id="c-trial_video" data-mimetype="video/mp4,video/flv" data-multiple="false" data-maxsize = "1024M"	data-preview-id="p-trial_video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-media_uri" class="btn btn-primary fachoose" data-input-id="c-trial_video" data-mimetype="video/mp4,video/flv"  data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-trial_video"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-trial_video"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Apply_start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-apply_start_time" class="form-control datetimepicker" data-date-min-date="{php} echo date('Y-m-d');{/php}" data-date-use-strict="true" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[apply_start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Apply_end_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-apply_end_time" class="form-control datetimepicker " data-date-min-date="{php} echo date('Y-m-d');{/php}" data-date-use-strict="true" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[apply_end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Expiry_start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-expiry_start_time" class="form-control datetimepicker" data-date-min-date="{php} echo date('Y-m-d');{/php}"  data-date-use-strict="true" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[expiry_start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Expiry_end_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-expiry_end_time" class="form-control datetimepicker" data-date-min-date="{php} echo date('Y-m-d');{/php}" data-date-use-strict="true" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[expiry_end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
